<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2023-01-09
 * Time: 20:51
 */

namespace App\controller\user;
use support\Request;
use think\facade\Db;
use App\model\user\UserAdmins;
class Login
{
    public function index(Request $request)
    {

    }

    public function initAdmin(Request $request)
    {

        $post=$request->post();
        $validate =new \App\validate\User();
        if(!$validate->check($post)){
            throw new Forbidden($validate->getError());
        }
        $admin=new UserAdmins;
        $post['roles']=['admin'];

    }
}